import request from '@/config/axios'

// 工程项目任务 API
export const ProjectDetailApi = {

  getProjectDetailList: async (data) => {
    return await request.post({ url: `/task/project-detail/list`, data })
  },


  // 查询工程项目任务分页
  getProjectDetailPage: async (params) => {
    return await request.get({ url: `/task/project-detail/page`, params })
  },

  // 查询工程项目任务详情
  getProjectDetail: async (id) => {
    return await request.get({ url: `/task/project-detail/get?id=` + id })
  },

  // 新增工程项目任务
  createProjectDetail: async (data) => {
    return await request.post({ url: `/task/project-detail/create`, data })
  },

  // 修改工程项目任务
  updateProjectDetail: async (data) => {
    return await request.put({ url: `/task/project-detail/update`, data })
  },

  putUpProjectDetail: async (id) => {
    return await request.get({ url: `/task/project-detail/putUp?id=` + id  })
  },

  putDownProjectDetail :async(id) =>{
    return await request.get({ url: `/task/project-detail/putDown?id=` + id  })
  },


  // 删除工程项目任务
  deleteProjectDetail: async (id) => {
    return await request.delete({ url: `/task/project-detail/delete?id=` + id })
  },

  // 导出工程项目任务 Excel
  exportProjectDetail: async (params) => {
    return await request.download({ url: `/task/project-detail/export-excel`, params })
  },
}
